Sahih
Muslim
صحيح مسلم
27
The Book of Oaths
كتاب الأيمان
Chapter 3: It is recommended for the one who swears an oath then sees that something else is better than it; To do that which is better and offer expiation for his oath
باب نَدْبِ مَنْ حَلَفَ يَمِينًا فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا أَنْ يَأْتِيَ الَّذِي هُوَ خَيْرٌ وَيُكَفِّرَ عَنْ يَمِينِهِ
Sahih Muslim 1650 c
Abu Huraira reported Allah's Messenger (ﷺ) as saying
He who took an oath and (later on) found another thing better than that, he should do that which is better, and expiate for the vow (broken by him).وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا ابْنُ أَبِي أُوَيْسٍ، حَدَّثَنِي عَبْدُ الْعَزِيزِ بْنُ الْمُطَّلِبِ، عَنْ سُهَيْلِ بْنِ أَبِي صَالِحٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ حَلَفَ عَلَى يَمِينٍ فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا فَلْيَأْتِ الَّذِي هُوَ خَيْرٌ وَلْيُكَفِّرْ عَنْ يَمِينِهِ " .
Grade: Sahih